import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/LoginView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 
    {
      path: '/',
      redirect: 'login'
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView
    },
    {
      path:'/fkmmanage',
      name:'fkmmanage',
      component: ()=>import('../views/FKMmanage.vue'),
      children:[
        {
          path:'/fkmmanage',
          redirect:'fkmmanage/records/7'
        },
        //关于fkm
        {
          path:'/fkmmanage/records/7',
          name:'records7',
          component: ()=>import('../components/fkmchidren/About fkm/Records7View.vue')
        },
        {
          path:'/fkmmanage/recordsadd/7',
          name:'recordsadd7',
          component: ()=>import('../components/fkmchidren/About fkm/RecordsAdd7.vue')
        },
        {
          path:'/fkmmanage/contact',
          name:'contact',
          component: ()=>import('../components/fkmchidren/About fkm/ContactView.vue')
        },
        {
          path:'/fkmmanage/records/6',
          name:'records6',
          component: ()=>import('../components/fkmchidren/About fkm/Records6View.vue')
        },
        //课程管理
        {
          path:'/fkmmanage/courses',
          name:'courses',
          component: ()=>import('../components/fkmchidren/Course Management/CoursesView.vue')
        },
        {
          path:'/fkmmanage/coursesadd',
          name:'coursesadd',
          component: ()=>import('../components/fkmchidren/Course Management/CoursesAdd.vue')
        },
        //师资管理
        {
          path:'/fkmmanage/teachers',
          name:'teachers',
          component: ()=>import('../components/fkmchidren/Teacher Management/TeachersView.vue')
        },
        {
          path:'/fkmmanage/teacheradd',
          name:'teacheradd',
          component: ()=>import('../components/fkmchidren/Teacher Management/TeacherAdd.vue')
        },
        //图片管理
        {
          path:'/fkmmanage/pictures',
          name:'pictures',
          component: ()=>import('../components/fkmchidren/Picture Management/PicturesView.vue')
        },
        {
          path:'/fkmmanage/pictureAdd',
          name:'pictureAdd',
          component: ()=>import('../components/fkmchidren/Picture Management/PictureAdd.vue')
        },
        //商品管理
        {
          path:'/fkmmanage/products',
          name:'products',
          component: ()=>import('../components/fkmchidren/Commodity Management/ProductsView.vue')
        },
        {
          path:'/fkmmanage/productAdd',
          name:'productAdd',
          component: ()=>import('../components/fkmchidren/Commodity Management/ProductAdd.vue')
        },
        {
          path:'/fkmmanage/orders',
          name:'orders',
          component: ()=>import('../components/fkmchidren/Commodity Management/OrdersView.vue')
        },
        //大事记
        {
          path:'/fkmmanage/records/1',
          name:'records1',
          component: ()=>import('../components/fkmchidren/Chronicle of Events/Records1View.vue')
        },
        {
          path:'/fkmmanage/records/2',
          name:'records2',
          component: ()=>import('../components/fkmchidren/Chronicle of Events/Records2View.vue')
        },
        {
          path:'/fkmmanage/records/3',
          name:'records3',
          component: ()=>import('../components/fkmchidren/Chronicle of Events/Records3View.vue')
        },
        {
          path:'/fkmmanage/records/4',
          name:'records4',
          component: ()=>import('../components/fkmchidren/Chronicle of Events/Records4View.vue')
        },
        {
          path:'/fkmmanage/records/5',
          name:'records5',
          component: ()=>import('../components/fkmchidren/Chronicle of Events/Records5View.vue')
        },
        //系统管理
        {
          path:'/fkmmanage/administrators',
          name:'administrators',
          component: ()=>import('../components/fkmchidren/System Management/AdminiStrators.vue')
        },
        {
          path:'/fkmmanage/administrators',
          name:'administrators',
          component: ()=>import('../components/fkmchidren/System Management/AdminiStrators.vue')
        },
        {
          path:'/fkmmanage/administrators',
          name:'administrators',
          component: ()=>import('../components/fkmchidren/System Management/AdminiStrators.vue')
        },
        {
          path:'/fkmmanage/administratorAdd',
          name:'administratorAdd',
          component: ()=>import('../components/fkmchidren/System Management/AdministratorAdd.vue')
        },
        {
          path:'/fkmmanage/adminRole',
          name:'adminRole',
          component: ()=>import('../components/fkmchidren/System Management/AdminRole.vue')
        },
        {
          path:'/fkmmanage/adminRoleAdd',
          name:'adminRoleAdd',
          component: ()=>import('../components/fkmchidren/System Management/AdminRoleAdd.vue')
        },
      ]
    }
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue')
    // }
  ]
})

export default router
